<?php
/**
 * The Imagess model class for abstracting operations to the Images Entity
 *
 */

class Transactions extends Zend_Db_Table
{
	protected $_name = 'transactions'; // The name of the database entity
    protected $_primary = 'ebayId'; // The primary key associated with this table
	
	    //Declare the relational links to other Database entities
    protected $_referenceMap    = array(
        'Status' => array(
            'columns'           => 'ebayId',
            'refTableClass'     => 'Status',
            'refColumns'        => 'ebayId'
        )
    );
	
	public function getTransactionsByEbayId($ebayId)
	{
		$row = $this->fetchAll($this->select()->where('ebayId = ?', $ebayId));		
		return $row;
	}
	
	public function getByEbayId($ebayId)
	{
		$row = $this->fetchRow($this->select()->where('ebayId = ?', $ebayId));		
		return $row;
	}
}